package com.leiyuan.exection;

/**
 * @author leiyuan
 * @version 1.0
 * @description 学成在线项目异常类
 * @date 2023/4/18 16:03
 */
public class ElearningPlusException extends RuntimeException{

    private static final long serialVersionUID = 5565760508056698922L;

    private String errMessage;

    public ElearningPlusException() {
        super();
    }

    public ElearningPlusException(String errMessage) {
        super(errMessage);
        this.errMessage = errMessage;
    }

    public String getErrMessage() {
        return errMessage;
    }

    public static void cast(CommonError commonError){
        throw new ElearningPlusException(commonError.getErrMessage());
    }
    public static void cast(String errMessage){
        throw new ElearningPlusException(errMessage);
    }
}
